package com.jt.demo51.pp03;
import com.jt.demo51.pp01.Service1;
import com.jt.demo51.pp01.Springconfig1;
import com.jt.demo51.pp01.UserDao;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Test {
    public static void main(String[] args) {
        ApplicationContext a = new AnnotationConfigApplicationContext(Springconfig1.class);
        UserDao bean = a.getBean(UserDao.class);
        UserDao ss=(UserDao)CglibProxy.getobject(bean);
       // ss.addUser();

        Service1 bean1 = a.getBean(Service1.class);
        Service1 service1=(Service1)CglibProxy.getobject(bean1);
        service1.amazed();
        //由于特殊原因,Service中不能注入Dao. 暂时不管Dog数据的实例化操作

    }
}
